<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	  <%@include file="/res/include/base-head.jsp"%>
	  <%@include file="/res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/user/userSuggest.js"></script>
  </head>
  <body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
				<dl>
					<dt>回复状态：</dt>
					<dd>
						<select name="isReply" class="txt grid-8">
							<option value="">请选择</option>
							<option value="1">已回复</option>
							<option value="2">未回复</option>
						</select>
					</dd>
				</dl>
				<dl>
					<dt>状态：</dt>
					<dd>
						<select name="status" class="txt grid-8">
							<option value="">请选择</option>
							<option value="1">正常</option>
							<option value="2">删除</option>
						</select>
					</dd>
				</dl>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.userSuggest.query()" />
	            </p>
	        </form>
	  	</div>
	    <div data-options="region:'center',border:false">
		    <table id="datagrid" data-options="url:'${pageContext.request.contextPath}/user/suggest/list',toolbar:'#toolbar'">
				<thead>
					<tr>
						<th data-options="field:'nick',width:100,align:'center'">昵称</th>
						<th data-options="field:'communityName',width:100,align:'center'">所属社区</th>
						<th data-options="field:'content',width:300,align:'center' ">问题与建议</th>
						<th data-options="field:'strNewAt',width:150,align:'center'">时间</th>
						<th data-options="field:'isReply',width:80,align:'center',formatter:formatIsReplay">回复状态</th>
						<th data-options="field:'status',width:80,align:'center',formatter:formatStatus">状态</th>
			            <th data-options="field:'id',align:'center',width:150,formatter:formatOperation">操作</th>
					</tr>
				</thead>
			</table>
	  	</div>
	</div>
	<script>
	function formatIsReplay(isReply){
		var l_html="未回复";
		if(isReply==1){
			l_html = '已回复';
		}
		return l_html;
	}
	function formatStatus(status){
		var l_html="正常";
		if(status==2){
			l_html = '删除';
		}
		return l_html;
	}
	function formatOperation(value,row,index) {
		var l_html = '<a href="javascript:;" class="table_link" onclick="admin.userSuggest.detail('+row.id+')">详情</a>';
		return l_html;
	}
	</script>
  </body>
</html>
